{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "2240f7da",
   "metadata": {},
   "source": [
    "------\n",
    "* 2022-08-30\n",
    "* python学习第二周\n",
    "* recorder: 小圆"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6b0eaf3c",
   "metadata": {},
   "source": [
    "# 本周学习内容\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "bce04db4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "51\n",
      "Not an odd minute.\n",
      "51\n"
     ]
    }
   ],
   "source": [
    "import datetime\n",
    "print(datetime.datetime.today().second)\n",
    "\n",
    "odds = [1,3,5,7,9,11,13,15,17,19,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "right_this_minute = datetime.datetime.today().minute\n",
    "\n",
    "if right_this_minute in odds :\n",
    "    print(\"This minute seems a little odd.\")\n",
    "else:\n",
    "        print(\"Not an odd minute.\")\n",
    "        \n",
    "print(datetime.datetime.today().second)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "635231f9",
   "metadata": {},
   "source": [
    "## 2.1模块--标准库\n",
    "* 标准库是Python开发团队为满足Python用户日常需求的写好的一些模块，可以直接使用；比如：import模块"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d5ee3e45",
   "metadata": {},
   "source": [
    "> 1.sys模块(系统)\n",
    "> 2.os模块（路径）\n",
    "> 3.datetime模块（时间）\n",
    "\n",
    "## 2.2 模块--开源模块（pypi.org）\n",
    "## 2.3 自定义模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4f00e36e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "132a8168",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]'"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sys.version"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "71a984aa",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "857ef750",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'C:\\\\Users\\\\Frances\\\\2022-8-30\\\\Python'"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "os.getcwd()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "e40bf7e2",
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "f10c65ae",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.date(2022, 8, 30)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.date.today()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "28382fd4",
   "metadata": {},
   "source": [
    "## 认识一下time模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "f4ac643b",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "52690b58",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2022, tm_mon=8, tm_mday=30, tm_hour=14, tm_min=29, tm_sec=49, tm_wday=1, tm_yday=242, tm_isdst=0)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.localtime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "34449a75",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1661841139.4791462"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.time() # 时间戳"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "50b18e00",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2022, tm_mon=8, tm_mday=30, tm_hour=6, tm_min=33, tm_sec=25, tm_wday=1, tm_yday=242, tm_isdst=0)"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.gmtime()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6beeae3e",
   "metadata": {},
   "source": [
    "## 3.赋值\n",
    "## 4.变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6bd5affd",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
